const global = getApp().globalData;
const wxApi = global.wxApi;
Component({
  data: {
    autoplay: true,
    interval: 4000,
    duration: 600,
    circular: true,
    indicatorDots: true,
    banners: []
  },
  properties: {
    banners: {
      type: Array,
      value: []
    }
  },
  methods: {
    onBannerDetail( e ) {
      let link = e.currentTarget.dataset.link;
      console.log( link );
      if ( link.indexOf('https') < 0 ) return;
      wxApi.navigateTo('../common/webview/webview', {
        src: link
      })
    }
  }
})